package com.canton.service.impl;
import com.canton.dao.entity.PestNode;
import com.canton.dao.repository.PestRepository;
import com.canton.service.PestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PestServiceImpl implements PestService {
    @Autowired
    private PestRepository pestRepository;


    @Override
    public PestNode findByName(String name) {
        return pestRepository.findByName(name);
    }

    @Override
    public List<PestNode> findAll() {
        return pestRepository.findAll();
    }

    @Override
    public List<PestNode> findByNameLike(String likes) {
        return pestRepository.findByNameLike(likes);
    }
}
